{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "ObD2YL7nM2_X"
   },
   "source": [
    "# AiZynthFinder\n",
    "\n",
    "Click the ▶ play button at the left of the **Installation** text below to install the application. The initial installation process may take a few minutes. Then run **Start application** cell. \n",
    "\n",
    "1. Enter the target compound [SMILES][1] code.\n",
    "3. Click the **Run Search** button to start the algorithm.\n",
    "4. Once it stops serching, click the **Show Reactions** button.\n",
    "\n",
    "[1]: https://en.wikipedia.org/wiki/Simplified_molecular-input_line-entry_system"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "#@title Installation -- Run this cell to install AiZynthFinder\n",
    "\n",
    "# This might not install the dependencies that you need\n",
    "#!(AIZ_LATEST_TAG=$(git -c 'versionsort.suffix=-' \\\n",
    "#    ls-remote --exit-code --refs --sort='version:refname' --tags https://github.com/MolecularAI/aizynthfinder '*.*.*' \\\n",
    "#    | tail --lines=1 \\\n",
    "#    | cut -f 3 -d /) \\\n",
    "#  && pip install --quiet https://github.com/MolecularAI/aizynthfinder/archive/${AIZ_LATEST_TAG}.tar.gz)\n",
    "!pip install --quiet aizynthfinder[all]\n",
    "!pip install --ignore-installed Pillow==9.0.0\n",
    "!mkdir --parents data && download_public_data data\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "beDP-CSNM429"
   },
   "outputs": [],
   "source": [
    "#@title Start application. {display-mode: \"form\"}\n",
    "\n",
    "from rdkit.Chem.Draw import IPythonConsole\n",
    "from aizynthfinder.interfaces import AiZynthApp\n",
    "application = AiZynthApp(\"./data/config.yml\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "bwxusoogwlI9"
   },
   "source": [
    "# Bibliography\n",
    "\n",
    "_Genheden S, Thakkar A, Chadimova V, et al (2020) AiZynthFinder: a fast, robust and flexible open-source software for retrosynthetic planning. J. Cheminf. https://doi.org/10.1186/s13321-020-00472-1 ([GitHub](https://github.com/MolecularAI/aizynthfinder) & [Documentation](https://molecularai.github.io/aizynthfinder/html/index.html))_"
   ]
  }
 ],
 "metadata": {
  "accelerator": "GPU",
  "colab": {
   "collapsed_sections": [],
   "name": "AiZynthFinder.ipynb",
   "private_outputs": true,
   "provenance": [],
   "toc_visible": true
  },
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
